# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=sshfs
pkgver=3.7.0
pkgrel=4
pkgdesc="FUSE client based on the SSH File Transfer Protocol"
url="https://github.com/libfuse/sshfs"
arch="all"
license="GPL-2.0-or-later"
depends="openssh-client fuse3"
makedepends="fuse3-dev glib-dev meson coreutils py3-docutils"
subpackages="$pkgname-doc"
source="https://github.com/libfuse/sshfs/releases/download/sshfs-$pkgver/sshfs-$pkgver.tar.xz"
options="!check" # requires FUSE kernel module to run tests

build() {
	meson \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--buildtype=plain \
		. output
	ninja -C output
}

package() {
	DESTDIR="$pkgdir" ninja -C output install

	mkdir -p "$pkgdir"/usr/share/doc/$pkgname/
	install -Dm644 README.rst ChangeLog.rst AUTHORS COPYING \
		"$pkgdir"/usr/share/doc/$pkgname/
}

sha512sums="bd8bcd45dd9a5e9686c6fb442e877ffdb592ba0d3424d5dab84a955bfafb17e8666abefba6857467833f5b285842bdadd5a9b6c9e8128ac2e564c36df79aa570  sshfs-3.7.0.tar.xz"
